import Vue from'vue';
import VueRouter from "vue-router";

const home=()=>import('../views/home')
const type=()=>import('../views/type')
const car=()=>import('../views/car')
const my=()=>import('../views/my')
const detail=()=>import('../views/detail')

Vue.use(VueRouter)


const routes=[
    {
        path:"",
        redirect:"/home"
    },
    {
        path:"/home",
        component:home
    },
    {
        path:"/type",
        component:type
    },
    {
        path:"/car",
        component:car
    },
    {
        path:"/my",
        component:my
    },
    {
        path:"/detail",
        component:detail
    }

]

const router=new VueRouter({
    routes,
    mode:'history'
})

export default router